import request from "@/utils/request";

export function getDetails(query) {
  return request({
    url: '/station/order/selectDivideAccountsList',
    method: 'get',
    params: query
  })
}

// 查询分账详情
export function viewDetails(query) {
  return request({
    url:'/station/order/selectDivideAccountsDetail',
    method: 'get',
    params: query
  })
}

// 修改分账设置
export function editRule(data) {
  return request({
    url: '/station/order/updateDivideSetting',
    method: 'post',
    data
  })
}

// 查询分账规则列表
export function getRule(query) {
  return request({
    url: '/station/order/selectDivideSettingList',
    params: query,
  })
}


// 查询分账设置详情
export function viewRule(query) {
  return request({
    url: '/station/order/selectDivideSettingDetail',
    params: query
  })
}

// 创建分账设置
export function addRule(data) {
  return request({
    url: '/station/order/creationDivideSetting',
    method: 'post',
    data
  })
}

//修改分账设置状态
export function changeStatus(query) {
  return request({
    url: '/station/order/selectDivideSettingStatus',
    params: query
  })
}

// 删除
export function delRule(data) {
  return request({
    url: '/station/order/deleteByBeginMmo',
    method: 'post',
    data
  })
}

// 获取油站
export function getStationByEnterprise(query) {
  return request({
    url: "/station/order/allList",
    method: "get",
    params: query,
  });
}

// 查询油企列表
export function enterpriseList(query) {
  return request({
    url: "/enterprise/info/list",
    method: "get",
    params: query,
  });
}
